package com.liuyihao.weatherreport;


import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;



import android.app.Application;
import android.os.Environment;
import android.util.Log;
import android.widget.ListView;

public class MyApplication extends Application {
	private static final String TAG="MyApp";
	private static Application mApplication;
	private static List<City> mCityList;
	private boolean isCityListComplite;
	private static List<String> list;
	public static String cityLBS="";
	
	@Override
	public void onCreate() {
		// TODO Auto-generated method stub
		super.onCreate();
		Log.i(TAG, "MyApplication-->onCreate()");
		mApplication=this;
		isCityListComplite=false;
	}
	public static List<String> getList(){
		return list;
	}
	
	public static List<City> getCityList(){
		return mCityList;
	}
	public static Application getInstance(){
		return mApplication;
	}



	public static City findCity(String name){
		City city=new City();
		for(City newcity : mCityList){
			if(newcity.getCity().equals(name))
			{city=newcity;}
		}
		return city;
	}

}
